package com.assets.room.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.assets.room.entity.Type;

import java.util.List;

@Dao
public interface TypeDao {

    @Insert
    void insertType(Type type);

    @Insert
    void insertType(List<Type> type);

    @Query("DELETE FROM t_info_type")
    void deleteAllData();

    @Query("SELECT name FROM t_info_type WHERE id = :id")
    String getNameById(String id);

    @Query("SELECT * FROM t_info_type WHERE id = :id")
    Type getAllById(String id);
}
